package com.bs.regsystemapi.controller;

import com.aliyuncs.exceptions.ClientException;
import com.bs.regsystemapi.entity.Result;
import com.bs.regsystemapi.service.ValidateCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: ning
 * @description 短信验证码
 * @date: 2023-01-23 12:19
 */
@RestController
@RequestMapping("/validateCode")
@Api(tags = "手机端-发送验证码接口")
public class ValidateCodeController {

    @Autowired
    private ValidateCodeService validateCodeService;


    /**
     * 手机快速登录时发送手机验证码
     * @param telephone
     * @return
     */
    @RequestMapping(value = "/send4Login",method = RequestMethod.POST)
    @ApiOperation(value = "手机端-登录-发送手机验证码", notes = "手机端-登录-发送手机验证码",
            httpMethod = "POST")
    public Result send4Login(String telephone){
       return validateCodeService.send4Login(telephone);
    }
}
